package com.bms.comm;

import org.springframework.security.core.context.SecurityContextHolder;

import com.bms.bean.User;

public class UserThread {

	public static User getUserThread() {
		MyUserDetails userDetails = (MyUserDetails) SecurityContextHolder
				.getContext().getAuthentication().getPrincipal();
		User user = userDetails.getUser();
		return user;
	}
}
